/*
 * @Author: your name
 * @Date: 2020-08-18 13:26:12
 * @LastEditTime: 2020-08-18 14:09:36
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue_large_screen_display\vue.config.js
 */
module.exports = {
    publicPath: process.env.NODE_ENV === "production" ? "/vueDataV/" : "/",
    productionSourceMap: false,
    lintOnSave: false,
    // disableHostCheck: true,

    devServer: {
        port: 8083,
        // open: process.platform === 'darwin',
        open: true,
        // HOST: "login.xuxiaowen.space",
        clientLogLevel: 'warning',
        historyApiFallback: true,
        hot: true,
        compress: true,
        // host: HOST || config.dev.host,
        // port: PORT || config.dev.port,
        // open: config.dev.autoOpenBrowser,
        // overlay: config.dev.errorOverlay,
        // host: 'http://login.xuxiaowen.space', //改为域名
        https: false,
        hotOnly: false,
        before: app => {},
        host: '0.0.0.0',
        // 代理
        proxy: {
            "/api": {
                target: "login.xuxiaowen.space",
                changeOrigin: true,
                ws: false,
                pathRewrite: {
                    "^/api": "/"
                }
            }
        },
        disableHostCheck: true
    },

    configureWebpack: {
        // 把原本需要写在webpack.config.js中的配置代码 写在这里 会自动合并
        externals: {
            'jquery': '$',
            'echarts': 'echarts',
            'axios': 'axios'
        }
    }
};